package com.steve.xfood.service;

import com.lly835.bestpay.model.PayResponse;
import com.steve.xfood.dto.OrderDTO;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author steve
 * @date 2020/5/15 11:03
 */
public interface WeChatPayService {

    /**
     * 发起订单支付
     * @param orderDTO
     * @return
     */
    PayResponse create(OrderDTO orderDTO);

    /**
     * 微信支付异步通知
     * @param notifyData
     * @return
     */
    PayResponse notify(@RequestBody String notifyData);

    /**
     * 取消订单
     * @param orderDTO 订单数据
     */
    void refund(OrderDTO orderDTO);
}
